package com.loong.seller.service.impl;

import com.loong.common.dubbo.service.AbstractService;
import com.loong.common.rest.rpc.RPCResponse;
import com.loong.seller.dto.ShopForeheadConsumerResult;
import com.loong.seller.handler.ShopDeliveryRuleHandler;
import com.loong.seller.service.IShopForeheadResultConsumerService;
import org.apache.dubbo.config.annotation.DubboService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 暴露接口 结果集 店铺配送费计算
 * @Author: hzp
 * @Date: 2020-12-16 16:23
 */
@DubboService(timeout = 5000,interfaceClass = IShopForeheadResultConsumerService.class)
public class ShopForeheadResultConsumerServiceImpl extends AbstractService implements IShopForeheadResultConsumerService {
    @Resource
    private ShopDeliveryRuleHandler shopDeliveryRuleHandler;
    @Override
    public RPCResponse<List<ShopForeheadConsumerResult>> resultConsumer(List<ShopForeheadConsumerResult> results) {
        return serviceExecutor.execute(()->shopDeliveryRuleHandler.resultConsumer(results));
    }
}
